<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">

<title>module TypeProf::CLI - typeprof: Ruby Standard Library Documentation</title>


<script src="../js/navigation.js" defer></script>
<script src="../js/search.js" defer></script>
<script src="../js/search_index.js" defer></script>
<script src="../js/searcher.js" defer></script>
<script src="../js/darkfish.js" defer></script>

<script src="../js/jquery-3.2.0.min.js"></script>

<script src="../js/vue.min.js"></script>
<script src="../js/js.cookie.min.js"></script>

<link href="../css/fonts.css" rel="stylesheet">
<link id='rdoccss' href="../css/rdoc.css" rel="stylesheet">
<link href="../css/carbon17.css" rel="stylesheet">

<script type="text/javascript">
  var rdoc_rel_prefix = "../";
  var index_rel_prefix = "../";
  var darkModeCsseHref = "../css/rdoc-dm.css"
  var defaultModeCssHref = "../css/rdoc.css"
  // var cssDarkmode = Cookies.get('darkmode');
  
  if( Cookies.get("darkmode") == "true") {
	$('#rdoccss').attr("href", darkModeCsseHref);
}

//  https://cssdeck.com/blog/simple-jquery-stylesheet-switcher/

document.write('<style type="text/css">body{display:none}</style>');

</script>


</head>
<body id="top" role="document" class="module">
  <!-- this is class.html -->

  <div id='actionbar' >
    <div class='wrapper mdiv'>
      <ul class='grids g0'></ul>
    </div> 
    <!-- VERSION HEADER for 3.3.0.preview2 NOT FOUND -->
  </div> <!-- end action bar -->

  <div class='wrapper hdiv'>

    


    <nav id='vapp' role="navigation">
    <div id="project-navigation">
      <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2><a href="../index.html" rel="home">Home</a></h2>

  <div id="table-of-contents-navigation"  >
    <a href="../table_of_contents.html#pages">Pages</a>
    <a href="../table_of_contents.html#classes">Classes</a>
    <a href="../table_of_contents.html#methods">Methods</a>
  </div>
</div>

      <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

    </div>


    

    <button id='toggleThing' @click="toggleNav()" >Show/hide navigation</button>
    <div :class="isOpen ? 'block' : 'hidden' " id='toggleMe'>
      <div id="class-metadata">
        
        
        
        
        
<!-- Method Quickref -->
<div id="method-list-section" class="nav-section">
  <h3>Methods</h3>

  <ul class="link-list" role="directory">
    <li ><a href="#method-i-parse">#parse</a>
  </ul>
</div>

      </div>
     </div>
    </nav>


    <div id='extraz'><div class='adzbox-index'  >
      
     </div>         
    </div>

    <main role="main" aria-labelledby="module-TypeProf::CLI">
    <h1 id="module-TypeProf::CLI" class="module">
      module TypeProf::CLI
    </h1>

    <section class="description">
    
    </section>

      <section id="5Buntitled-5D" class="documentation-section">





                <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
                <header>
                <h3>Public Instance Methods</h3>
                </header>

                  <div id="method-i-parse" class="method-detail ">
                            <div class="method-heading">
                              <span class="method-name">parse</span><span
                                class="method-args">(argv)</span>
                              <span class="method-click-advice">click to toggle source</span>
                            </div>

                            <div class="method-description">
                              

                              <div class="method-source-code" id="parse-source">
            <pre><span class="ruby-comment"># File typeprof-0.21.8/lib/typeprof/cli.rb, line 7</span>
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">parse</span>(<span class="ruby-identifier">argv</span>)
  <span class="ruby-identifier">opt</span> = <span class="ruby-constant">OptionParser</span>.<span class="ruby-identifier">new</span>

  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">banner</span> = <span class="ruby-node">&quot;Usage: #{ opt.program_name } [options] files...&quot;</span>

  <span class="ruby-identifier">output</span> = <span class="ruby-keyword">nil</span>

  <span class="ruby-comment"># Verbose level:</span>
  <span class="ruby-comment"># * 0: none</span>
  <span class="ruby-comment"># * 1: default level</span>
  <span class="ruby-comment"># * 2: debugging level</span>
  <span class="ruby-identifier">verbose</span> = <span class="ruby-value">1</span>

  <span class="ruby-identifier">options</span> = {}
  <span class="ruby-identifier">lsp_options</span> = {}
  <span class="ruby-identifier">dir_filter</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-identifier">gem_rbs_features</span> = []
  <span class="ruby-identifier">show_version</span> = <span class="ruby-keyword">false</span>
  <span class="ruby-identifier">max_sec</span> = <span class="ruby-identifier">max_iter</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-identifier">collection_path</span> = <span class="ruby-keyword">nil</span>
  <span class="ruby-identifier">no_collection</span> = <span class="ruby-keyword">false</span>

  <span class="ruby-identifier">load_path_ext</span> = []

  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&quot;&quot;</span>
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&quot;Options:&quot;</span>
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;-o OUTFILE&quot;</span>, <span class="ruby-string">&quot;Output to OUTFILE instead of stdout&quot;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">output</span> = <span class="ruby-identifier">v</span> }
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;-q&quot;</span>, <span class="ruby-string">&quot;--quiet&quot;</span>, <span class="ruby-string">&quot;Do not display progress indicator&quot;</span>) { <span class="ruby-identifier">options</span>[<span class="ruby-value">:show_indicator</span>] = <span class="ruby-keyword">false</span> }
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;-v&quot;</span>, <span class="ruby-string">&quot;--verbose&quot;</span>, <span class="ruby-string">&quot;Alias to --show-errors&quot;</span>) { <span class="ruby-identifier">options</span>[<span class="ruby-value">:show_errors</span>] = <span class="ruby-keyword">true</span> }
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--version&quot;</span>, <span class="ruby-string">&quot;Display typeprof version&quot;</span>) { <span class="ruby-identifier">show_version</span> = <span class="ruby-keyword">true</span> }
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;-I DIR&quot;</span>, <span class="ruby-string">&quot;Add DIR to the load/require path&quot;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">load_path_ext</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">v</span> }
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;-r FEATURE&quot;</span>, <span class="ruby-string">&quot;Require RBS of the FEATURE gem&quot;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">gem_rbs_features</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">v</span> }
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--collection PATH&quot;</span>, <span class="ruby-string">&quot;File path of collection configuration&quot;</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">collection_path</span> = <span class="ruby-constant">Pathname</span>(<span class="ruby-identifier">v</span>) }
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--no-collection&quot;</span>, <span class="ruby-string">&quot;Ignore collection configuration&quot;</span>) { <span class="ruby-identifier">no_collection</span> = <span class="ruby-keyword">true</span> }
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--lsp&quot;</span>, <span class="ruby-string">&quot;LSP mode&quot;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:lsp</span>] = <span class="ruby-keyword">true</span> }

  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&quot;&quot;</span>
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&quot;Analysis output options:&quot;</span>
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--include-dir DIR&quot;</span>, <span class="ruby-string">&quot;Include the analysis result of .rb file in DIR&quot;</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dir</span><span class="ruby-operator">|</span>
    <span class="ruby-comment"># When `--include-dir` option is specified as the first directory option,</span>
    <span class="ruby-comment"># typeprof will exclude any files by default unless a file path matches the explicit option</span>
    <span class="ruby-identifier">dir_filter</span> <span class="ruby-operator">||=</span> [[<span class="ruby-value">:exclude</span>]]
    <span class="ruby-identifier">dir_filter</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-value">:include</span>, <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">dir</span>)]
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--exclude-dir DIR&quot;</span>, <span class="ruby-string">&quot;Exclude the analysis result of .rb file in DIR&quot;</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">dir</span><span class="ruby-operator">|</span>
    <span class="ruby-comment"># When `--exclude-dir` option is specified as the first directory option,</span>
    <span class="ruby-comment"># typeprof will include any files by default, except Ruby&#39;s install directory and Gem directories</span>
    <span class="ruby-identifier">dir_filter</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">ConfigData</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_DIR_FILTER</span>
    <span class="ruby-identifier">dir_filter</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-value">:exclude</span>, <span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-identifier">dir</span>)]
  <span class="ruby-keyword">end</span>
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--exclude-untyped&quot;</span>, <span class="ruby-string">&quot;Exclude (comment out) all entries including untyped&quot;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:exclude_untyped</span>] = <span class="ruby-identifier">v</span> }
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--[no-]show-typeprof-version&quot;</span>, <span class="ruby-string">&quot;Display TypeProf version in a header&quot;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:show_typeprof_version</span>] = <span class="ruby-identifier">v</span> }
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--[no-]show-errors&quot;</span>, <span class="ruby-string">&quot;Display possible errors found during the analysis&quot;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:show_errors</span>] = <span class="ruby-identifier">v</span> }
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--[no-]show-untyped&quot;</span>, <span class="ruby-string">&quot;Display \&quot;Foo | untyped\&quot; instead of \&quot;Foo\&quot;&quot;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:show_untyped</span>] = <span class="ruby-identifier">v</span> }
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--[no-]show-parameter-names&quot;</span>, <span class="ruby-string">&quot;Display parameter names for methods&quot;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:show_parameter_names</span>] = <span class="ruby-identifier">v</span> }
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--[no-]show-source-locations&quot;</span>, <span class="ruby-string">&quot;Display definition source locations for methods&quot;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:show_source_locations</span>] = <span class="ruby-identifier">v</span> }

  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&quot;&quot;</span>
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&quot;Analysis limit options:&quot;</span>
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--max-second SECOND&quot;</span>, <span class="ruby-constant">Float</span>, <span class="ruby-string">&quot;Limit the maxium time of analysis (in second)&quot;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">max_sec</span> = <span class="ruby-identifier">v</span> }
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--max-iteration TIMES&quot;</span>, <span class="ruby-constant">Integer</span>, <span class="ruby-string">&quot;Limit the maxium instruction count of analysis&quot;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">max_iter</span> = <span class="ruby-identifier">v</span> }

  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&quot;&quot;</span>
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&quot;Advanced options:&quot;</span>
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--[no-]stub-execution&quot;</span>, <span class="ruby-string">&quot;Force to call all unreachable methods with \&quot;untyped\&quot; arguments&quot;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:stub_execution</span>] = <span class="ruby-identifier">v</span> }
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--type-depth-limit DEPTH&quot;</span>, <span class="ruby-constant">Integer</span>, <span class="ruby-string">&quot;Limit the maximum depth of nested types&quot;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:type_depth_limit</span>] = <span class="ruby-identifier">v</span> }
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--union-width-limit WIDTH&quot;</span>, <span class="ruby-constant">Integer</span>, <span class="ruby-string">&quot;Limit the maximum count of class instances in one union type&quot;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:union_width_limit</span>] = <span class="ruby-identifier">v</span> }
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--debug&quot;</span>, <span class="ruby-string">&quot;Display analysis log (for debugging purpose)&quot;</span>) { <span class="ruby-identifier">verbose</span> = <span class="ruby-value">2</span> }
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--[no-]stackprof MODE&quot;</span>, <span class="ruby-regexp">/\Acpu|wall|object\z/</span>, <span class="ruby-string">&quot;Enable stackprof (for debugging purpose)&quot;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">options</span>[<span class="ruby-value">:stackprof</span>] = <span class="ruby-identifier">v</span>.<span class="ruby-identifier">to_sym</span> }

  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&quot;&quot;</span>
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">separator</span> <span class="ruby-string">&quot;LSP options:&quot;</span>
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--port PORT&quot;</span>, <span class="ruby-constant">Integer</span>, <span class="ruby-string">&quot;Specify a port number to listen for requests on&quot;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">lsp_options</span>[<span class="ruby-value">:port</span>] = <span class="ruby-identifier">v</span> }
  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">on</span>(<span class="ruby-string">&quot;--stdio&quot;</span>, <span class="ruby-string">&quot;Use stdio for LSP transport&quot;</span>) {<span class="ruby-operator">|</span><span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">lsp_options</span>[<span class="ruby-value">:stdio</span>] = <span class="ruby-identifier">v</span> }

  <span class="ruby-identifier">opt</span>.<span class="ruby-identifier">parse!</span>(<span class="ruby-identifier">argv</span>)

  <span class="ruby-identifier">$LOAD_PATH</span>.<span class="ruby-identifier">unshift</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">load_path_ext</span>)

  <span class="ruby-identifier">dir_filter</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">ConfigData</span><span class="ruby-operator">::</span><span class="ruby-constant">DEFAULT_DIR_FILTER</span>
  <span class="ruby-identifier">rb_files</span> = []
  <span class="ruby-identifier">rbs_files</span> = []
  <span class="ruby-identifier">argv</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">path</span><span class="ruby-operator">|</span>
    <span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">extname</span>(<span class="ruby-identifier">path</span>) <span class="ruby-operator">==</span> <span class="ruby-string">&quot;.rbs&quot;</span>
      <span class="ruby-identifier">rbs_files</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">path</span>
    <span class="ruby-keyword">else</span>
      <span class="ruby-identifier">rb_files</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">path</span>
    <span class="ruby-keyword">end</span>
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;typeprof #{ VERSION }&quot;</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">show_version</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">rb_files</span>.<span class="ruby-identifier">empty?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-value">:lsp</span>]
    <span class="ruby-identifier">exit</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">show_version</span>
    <span class="ruby-identifier">raise</span> <span class="ruby-constant">OptionParser</span><span class="ruby-operator">::</span><span class="ruby-constant">InvalidOption</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&quot;no input files&quot;</span>)
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">options</span>[<span class="ruby-value">:lsp</span>] <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">lsp_options</span>.<span class="ruby-identifier">empty?</span>
    <span class="ruby-identifier">exit</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">show_version</span>
    <span class="ruby-identifier">raise</span> <span class="ruby-constant">OptionParser</span><span class="ruby-operator">::</span><span class="ruby-constant">InvalidOption</span>.<span class="ruby-identifier">new</span>(<span class="ruby-string">&quot;lsp options with non-lsp mode&quot;</span>)
  <span class="ruby-keyword">end</span>

  <span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">no_collection</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">collection_path</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-operator">!</span><span class="ruby-identifier">collection_path</span>.<span class="ruby-identifier">exist?</span>
    <span class="ruby-identifier">exit</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">show_version</span>
    <span class="ruby-identifier">raise</span> <span class="ruby-constant">OptionParser</span><span class="ruby-operator">::</span><span class="ruby-constant">InvalidOption</span>.<span class="ruby-identifier">new</span>(<span class="ruby-node">&quot;collection path not found (#{collection_path})&quot;</span>)
  <span class="ruby-keyword">end</span>

  <span class="ruby-identifier">collection_path</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">RBS</span><span class="ruby-operator">::</span><span class="ruby-constant">Collection</span><span class="ruby-operator">::</span><span class="ruby-constant">Config</span><span class="ruby-operator">::</span><span class="ruby-constant">PATH</span>
  <span class="ruby-identifier">collection_path</span> = <span class="ruby-keyword">nil</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">no_collection</span>

  <span class="ruby-constant">ConfigData</span>.<span class="ruby-identifier">new</span>(
    <span class="ruby-value">rb_files:</span> <span class="ruby-identifier">rb_files</span>,
    <span class="ruby-value">rbs_files:</span> <span class="ruby-identifier">rbs_files</span>,
    <span class="ruby-value">output:</span> <span class="ruby-identifier">output</span>,
    <span class="ruby-value">gem_rbs_features:</span> <span class="ruby-identifier">gem_rbs_features</span>,
    <span class="ruby-value">collection_path:</span> <span class="ruby-identifier">collection_path</span>,
    <span class="ruby-value">verbose:</span> <span class="ruby-identifier">verbose</span>,
    <span class="ruby-value">dir_filter:</span> <span class="ruby-identifier">dir_filter</span>,
    <span class="ruby-value">max_sec:</span> <span class="ruby-identifier">max_sec</span>,
    <span class="ruby-value">max_iter:</span> <span class="ruby-identifier">max_iter</span>,
    <span class="ruby-value">options:</span> <span class="ruby-identifier">options</span>,
    <span class="ruby-value">lsp_options:</span> <span class="ruby-identifier">lsp_options</span>,
  )

<span class="ruby-keyword">rescue</span> <span class="ruby-constant">OptionParser</span><span class="ruby-operator">::</span><span class="ruby-constant">InvalidOption</span>, <span class="ruby-constant">OptionParser</span><span class="ruby-operator">::</span><span class="ruby-constant">MissingArgument</span>
  <span class="ruby-identifier">puts</span> <span class="ruby-identifier">$!</span>
  <span class="ruby-identifier">exit</span> <span class="ruby-value">1</span>
<span class="ruby-keyword">end</span></pre>
                              </div>
                            </div>


                          </div>

                          </section>

              </section>
              </main>



            </div>  <!--  class='wrapper hdiv' -->


<footer id="validator-badges" role="contentinfo">
<p><a href="https://validator.w3.org/check/referer">Validate</a></p>
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.4.0.</p>
<p>Based on <a href="https://github.com/ged/darkfish/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>

  
    <p><p><a href="https://ruby-doc.org">Ruby-doc.org</a> is provided by <a href="https://jamesbritt.com">James Britt</a> and <a href="https://neurogami.com">Neurogami</a>.</p><p><a href="https://jamesbritt.bandcamp.com/">Maximum R+D</a>.  </p>
</p>
  
  </footer>

<script type="text/javascript">


  let ads  = $("#carbonads-container").children().detach();


  function swapMode() {
    var cookieName = 'darkmode';
    var cssDarkmode = Cookies.get(cookieName);
    console.log("***** swapMode! " + cssDarkmode + " *****");


    if (cssDarkmode == "true") {
      console.log("We have dark mode, set the css to light ...");
      $('#rdoccss').attr("href", defaultModeCssHref);
      $('#cssSelect').text("Dark mode");
      cssDarkmode = "false";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    } else {
      console.log("We not have dark mode, set the css to dark ...");
      $('#rdoccss').attr("href", darkModeCsseHref);
      $('#cssSelect').text("Light mode");
      cssDarkmode = "true";
      console.log("swapMode! Now set cookie to " + cssDarkmode);
      Cookies.set(cookieName, cssDarkmode);

    }

    console.log("  --------------- ");
  }


const vueCssApp = new Vue({
el: '#menubar',
data: {
isDark: false
},
methods: {
toggleClass: function(event){
this.isDark = !this.isDark;
}
}
})

const vueApp = new Vue({
el: '#vapp',
data: { 
isOpen: true
},

mounted() {
this.handleResize();
this.manage_mob_classes();
window.addEventListener('resize', this.handleResize)
//this.isOpen !=  (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},
destroyed() {
window.removeEventListener('resize', this.handleResize)
},
created() {
//manage_mob_classes();
},

methods : {
isMobile() {
  return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent));
},

  handleResize() {
    if (!this.isMobile()) {
      this.isOpen = window.innerWidth > 800;
    }
  },

  manage_mob_classes() {
    if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
      $("nav").addClass("mob_nav");
      $("main").addClass("mob_main");
      $("#extraz").addClass("mob_extraz");
      $("#carbonads-container").addClass("mob_carbonads-container");
      this.isOpen  = false;
    } else {
      $("nav").removeClass("mob_nav") 
        $("main").removeClass("mob_main");
      $("#extraz").removeClass("mob_extraz");
      $("#carbonads-container").removeClass("mob_carbonads-container");
      this.isOpen  = true;
    }
  },

  toggleNav() {
    this.isOpen =! this.isOpen ;
    // alert("Toggle nav!");
    console.log("toggleNav() click: " + this.isOpen );
  }
}
})

$("#carbonads-container").append(ads);


$(function() {

    var darkmode = Cookies.get("darkmode");
    console.log("Document ready: " + darkmode);

    if ( darkmode  == "true" ) {
      $('#cssSelect').text("Light mode");
    } else {
      $('#cssSelect').text("Dark mode");
     }

    $('body').css('display','block');
    });

</script>

    
  </body> 
</html>

